﻿using System;
using EkStudio.com.bean.xml.RootInterface;
using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.Unit;

namespace EkStudio.com.bean.xml.WorkFlow.Node
{
    /// <summary>
    /// 审批类型节点[审批人,超时设定,流过设定]
    /// </summary>
    public class WflowNodeItemActivity :BillObjectInterface
    {
        private string type = WflowUtility.NODE_COMMENT_APPROVE_TYPE;// "StApprove";

        private WflowNodeItemAExecute executeProperties = null;
        private WflowNodeItemATimeOut timeOutProperties = null;
        private WflowNodeItemAOutBand flowOutProperties = null;

        [Xml("type")]
        public string Type
        {
            get
            {
                return type;
            }

            set
            {
                type = value;
            }
        }

        [XmlTransient]
        public object ParentBean
        {
            get
            {
                throw new NotImplementedException();
            }

            set
            {
                throw new NotImplementedException();
            }
        }
        [XmlElement]
        public WflowNodeItemAExecute ExecuteProperties
        {
            get
            {
                return executeProperties;
            }

            set
            {
                executeProperties = value;
            }
        }
        [XmlElement]
        public WflowNodeItemATimeOut TimeOutProperties
        {
            get
            {
                return timeOutProperties;
            }

            set
            {
                timeOutProperties = value;
            }
        }
        [XmlElement]
        public WflowNodeItemAOutBand FlowOutProperties
        {
            get
            {
                return flowOutProperties;
            }

            set
            {
                flowOutProperties = value;
            }
        }

        public object Clone()
        {
            WflowNodeItemActivity clone = new WflowNodeItemActivity();
            clone.Type = type;
            if (executeProperties != null) clone.ExecuteProperties = executeProperties.Clone() as WflowNodeItemAExecute;
            if (timeOutProperties != null) clone.TimeOutProperties = timeOutProperties.Clone() as WflowNodeItemATimeOut;
            if (flowOutProperties != null) clone.FlowOutProperties = flowOutProperties.Clone() as WflowNodeItemAOutBand;
            return clone;
        }
    }
}